__author__ = 'xiaosu'

from octopus import db
from config import SQLALCHEMY_DATABASE_URI
from octopus.models import Users
from hashlib import md5

admin_password="octopus"
admin=Users('admin',md5(admin_password).hexdigest(),"your realname","your cell phone number here","example@example.com",comment="hello world",is_admin=True,is_locked=False)

db.create_all()
try:
    db.session.add(admin)
    db.session.commit()
except Exception as e:
    print "Add admin failed,here is the information:"
    print str(e)